package com.sys.app.mapper.page;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface PageQueryMapper extends BaseMapper<Object> {
    @Select({"select tmp.* from (${sql}) tmp ${ew.customSqlSegment}"})
    IPage<Map<String, Object>> pageList(Page page,String sql, @Param(Constants.WRAPPER) QueryWrapper<Map<String, Object[]>> queryWrapper);
}
